
import { createRouter, createWebHashHistory } from "vue-router";

const router = createRouter({
  history: createWebHashHistory(),
  routes: [
    {
      path: "/user",
      component: () => import("@/views/user/User.vue"),
    },
    {
      path: "/chat",
      component: () => import("@/views/chat/Chat.vue"),
      children: [
        {
          path: ':id',
          component: () => import("@/components/dialog/DialogMessage.vue"),
        }
      ]
    },
    {
      path: '/role',
      component: () => import('@/views/role/Role.vue'),
      children: [
        {
          path: ':id',
          component: () => import('@/components/role/RoleDetail.vue'),
        }
      ]
    }
  ],
});

export default router;